package com.nothing.thread.aqs;

import java.util.concurrent.locks.AbstractQueuedSynchronizer;
import java.util.concurrent.locks.ReentrantLock;

public class TestAQS {
    private static class Sync extends AbstractQueuedSynchronizer {
        protected boolean isHand() {
            compareAndSetState(0,1);
            acquire(1);
            return getState() == 1;
        }
        ReentrantLock reentrantLock = new ReentrantLock();
    }
}
